<div class="block">
  <div class="content">
    <div class="inner">
      <h1 class="title">ようこそ <%= GlobalSetting[:sns_name] %> へ！</h1>
      <p>
        <%= GlobalSetting[:sns_description] %>
      </p>
    </div>
  </div>
</div>

<% if logged_in? %>
<div class="block">
  <% unless @system_messages.empty? %>
    <h3 class="title">システムからのお知らせ</h3>
    <div class="content">
      <%= render :partial => "system_messages" %>
    </div>
  <% end %>

  <h3 class="title">新着メッセージ</h3>
  <div class="content">
    <%= render :partial => "portal/messages/messages", :locals => {:messages => @new_messages} %>
  </div>

  <h3 class="title">新着ブログコメント</h3>
  <div class="content">
    <%= render :partial => "new_blog_comments", :locals => {:comments => @new_blog_comments} %>
  </div>

  <h3 class="title">新着コミュニティ投稿</h3>
  <div class="content">
    <%= render :partial => "new_messages", :locals => {:messages => @board_messages} %>
  </div>
</div>
<% end %>


<% content_for :sidebar do %>
  <div class="block">
    <h3 class="information">インフォメーション</h3>
    <div class="content">
      <% if logged_in? %>
        <p>
          <%= get_avatar_image(@profile) %>
        </p>
        <p><%= @profile.user.nick_name %></p>
      <% else %>
        <p>非ログイン状態</p>
      <% end %>
    </div>
  </div>

  <div class="block">
    <h3 class="eventCalendar">イベントカレンダー</h3>
    <div class="contentCalendar">
      <%= raw event_calendar(218, 180, 'on') %>
    </div>
  </div>
<% end %>
